package com.dmz.workflow.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.dmz.workflow.entity.FlowableForm;
import com.dmz.workflow.entity.FormInfo;
import com.echronos.workflow.entity.*;
import com.dmz.workflow.vo.FormInfoGroupVo;
import com.dmz.workflow.vo.FormInfoVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 流程表单列表
 */
public interface FlowableFormMapper extends BaseMapper<FormInfo> {

    List<FormInfoGroupVo> list(IPage<FormInfoGroupVo> page, @Param("formInfoGroup") FormInfoGroupVo formInfoGroup);

    void updateFormById(FlowableForm flowableForm);

    /**
     * 新增表单
     */
    int saveForm(FormInfo flowableForm);

    void updateFromSort(List<FormInfoVo> infoVos);

    /**
     * 查询停用表单列表
     */
    List<FormInfoGroupVo> prohibitFromList();

    /**
     * 用户权限列表展示
     */
    List<FormInfoGroupVo> userList(IPage<FormInfoGroupVo> page, @Param("formInfoGroup") FormInfoGroupVo formInfoGroup);

    List<FormInfoVo> getFronInfoCollection(Integer groupId);

    List<FormInfoVo> queyUserList(Map<String, Object> map);

    FormInfoVo queryWorkflowById(String id);

    void removeFormByWid(String processDefinitionId);

    void deleteFromInfoByWid(String processDefinitionId);

    /**
     * 根据id 修改流程停用，激活
     */
    void updateInfoById(FormInfo flowableForm);

}
